feat: add multi-account support for providers#9827
Closed
shkumbinhasani wants to merge 1 commit intoanomalyco:devfrom
Closed
feat: add multi-account support for providers#9827shkumbinhasani wants to merge 1 commit intoanomalyco:devfrom
shkumbinhasani wants to merge 1 commit intoanomalyco:devfrom
Conversation
Allow users to connect multiple accounts for the same provider (e.g., two OpenAI accounts or two GitHub Copilot accounts with different credentials). - Add label field to auth schema for account identification - Store aliased accounts with keys like 'openai:Work' - Aliased providers inherit models from base provider - Fix SDK caching to use separate instances per provider ID - Add UI flow for 'Add another account' when provider is connected - Pass label through OAuth and API auth flows
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs Found:
Both of these PRs appear to address similar multi-account functionality. You should review them to ensure PR #9827 doesn't duplicate existing work or if there are complementary aspects that should be coordinated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow users to connect multiple accounts for the same provider (e.g., two OpenAI accounts or two GitHub Copilot accounts with different credentials).
Changes
labelfield to auth schema for account identificationopenai:WorkHow it works
pto connect a providergithub-copilot:Work)Files changed
packages/opencode/src/auth/index.ts- Added label field and helper functionspackages/opencode/src/provider/provider.ts- Aliased provider loading + SDK cache fixpackages/opencode/src/provider/auth.ts- Label support in OAuth flowpackages/opencode/src/provider/models.ts- Schema updatespackages/opencode/src/server/routes/provider.ts- API label parameterpackages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx- UI for managing accountspackages/sdk/js/src/v2/gen/*- Regenerated SDK types